using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MapEndPoint : MonoBehaviour
{
    private void Update()
    {
        transform.Rotate(Vector3.forward * 0.25f);
    }

    private void OnTriggerEnter2D(Collider2D other)
    {
        if (other.tag.Equals("Player") && other.transform.parent.name.Equals("Player"))
        {
            print(other.name + "MapEndPoint");
            GameController.Instance().mapCtr.TurnToNextMap();
            GameController.Instance().weaponCtr.Weapon.UpdateWeaponLevelData();//更新TempLevelData
            GameController.Instance().playerCtr.UpdateHPMPLevelData();
            GameController.Instance().archiveCtr.SaveArchive();
        }
    }
}